#include <stdio.h>

int main()
{
    int a = 0;
    int b = 0;
    int c = 0;
    printf("Tips:输入的数字用空格隔开\n请输入两个数字：");
    scanf("%d %d", &a, &b);
    if(a < b)
    {
        c = b;
        b = a;
        a = c;
    }//XXX保证a大于b
    while(b != 0)
    {
        c = b;
        b = a % b;
        a = c;
    }
    printf("%d", a);
    return 0;
}